With some types of data, such as graphics data, large blocks of data often need to undergo the same processing operations. One example is when changing the brightness of an image. SIMD processing is advantageous for this process. A SIMD processor is a microprocessor with execution units, caches and memories as with any other processor, but additionally incorporates the concept of parallel execution of multiple data streams. Instead of individually fetching data instances, a single fetch instruction can be used to fetch a block of data. A single instruction can then be used to operate on the fetched data block, such as an “add” operation. SIMD processing therefore reduces the load on the processor as compared with traditional single instruction single data (SISD) processing.
However, SIMD processing can only be used in limited circumstances. For example, even in situations where large blocks of data are initially to be processed in the same way, programs often contain conditional instructions or branch instructions that result in some data in a block being operated on by one branch of instructions and the remaining data by another branch of instructions. It is very often not possible to predict in advance how many data instances will need to be processed by one branch and how many by another.
Typically in a SIMD processor, a scheduler is used to schedule the execution of a program, allocating the resources required by the program at the outset. One solution for programs in which different parts of a data set are processed by different instruction during a portion of the program has been to execute each branch on all of the data and then discard the unwanted results. Clearly this is an inefficient use of processor resources and time.
Accordingly, it would be desirable to be able to better allocate resources during the execution of programs in a SIMD processor, both to reduce power consumption and to optimise resource usage.